package com.atwisdom.star.core.bsl.functionClass;

import com.alibaba.fastjson.JSONObject;
import com.atwisdom.star.common.vo.ActionData;
import com.atwisdom.star.common.vo.ResultInfo;
import com.atwisdom.star.core.dao.pojo.functionClass.DatabaseBackup;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;

public interface DatabaseBslService {

    ResultInfo<?> queryByPage(ActionData<JSONObject> actionData);

    @Transactional(rollbackFor = Exception.class)
    ResultInfo<?> backup(ActionData<JSONObject> actionData) throws IOException;

    @Transactional(rollbackFor = Exception.class)
    ResultInfo<?> restore(ActionData<JSONObject> actionData) throws IOException;

    @Transactional(rollbackFor = Exception.class)
    ResultInfo<?> init(ActionData<JSONObject> actionData);
}
